﻿<phone:PhoneApplicationPage 
    x:Class="HOLAB_1.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">
	<phone:PhoneApplicationPage.Resources>
		<Style x:Key="MenuTitle" TargetType="TextBlock">
            <Setter Property="Margin" Value="10,5,5,5">               
            </Setter>
			<Setter Property="Foreground">
				<Setter.Value>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="Black" Offset="0"/>
						<GradientStop Color="#FFA97A26" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="FontFamily" Value="Segoe WP SemiLight"/>
			<Setter Property="FontWeight" Value="Normal"/>
			<Setter Property="FontSize" Value="32"/>
			<Setter Property="FontStyle" Value="Normal"/>
		</Style>
		<ControlTemplate x:Key="MenuButton" TargetType="Button">
			<Border x:Name="border" BorderThickness="2" Padding="5,2,2,2" BorderBrush="#FFCA6F00" CornerRadius="10" RenderTransformOrigin="0.5,0.5">
				<Border.Resources>
					<Storyboard x:Name="AnnimateBanner"/>
				</Border.Resources>
				<Border.RenderTransform>
					<CompositeTransform/>
				</Border.RenderTransform>
				<Border.Background>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FF413E3E"/>
						<GradientStop Color="#FFA9A6A6" Offset="1"/>
					</LinearGradientBrush>
				</Border.Background>
				<VisualStateManager.VisualStateGroups>
					<VisualStateGroup x:Name="CommonStates">
						<VisualState x:Name="Disabled"/>
						<VisualState x:Name="Normal"/>
						<VisualState x:Name="MouseOver"/>
						<VisualState x:Name="Pressed">
							<Storyboard>
								<DoubleAnimation Duration="0" To="2" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="border" d:IsOptimized="True"/>
								<DoubleAnimation Duration="0" To="2" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="border" d:IsOptimized="True"/>
							</Storyboard>
						</VisualState>
					</VisualStateGroup>
					<VisualStateGroup x:Name="FocusStates">
						<VisualState x:Name="Unfocused">
							<Storyboard>
								<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(Border.BorderBrush).(Brush.Opacity)" Storyboard.TargetName="border" d:IsOptimized="True"/>
							</Storyboard>
						</VisualState>
						<VisualState x:Name="Focused"/>
					</VisualStateGroup>
				</VisualStateManager.VisualStateGroups>
				<TextBlock TextWrapping="Wrap" Text="Click Me" FontFamily="Segoe WP SemiLight" FontSize="26.667" HorizontalAlignment="Left" VerticalAlignment="Center"/>
			</Border>
		</ControlTemplate>
		<Storyboard x:Name="Storyboard1">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="hyperlinkButton">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-1">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
        	<RowDefinition Height="Auto"/>
        	<RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="{Binding Source={StaticResource AppName}}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="tbMainPage" Text="Main Page" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">

            <ScrollViewer BorderBrush="Transparent" >
                <StackPanel Margin="5" >                    
                    <Button Content="Music" Template="{StaticResource MenuButton}" Click="Button_Click" />
                    <HyperlinkButton x:Name="hyperlinkButton" NavigateUri="/Music/Music1.mp3" Content="Hello world app" Style="{StaticResource PhoneHyperlinkStyle}" RenderTransformOrigin="0.5,0.5" CacheMode="BitmapCache" >
                    	<HyperlinkButton.RenderTransform>
                    		<CompositeTransform/>
                    	</HyperlinkButton.RenderTransform>
                    </HyperlinkButton>
                    <HyperlinkButton NavigateUri="/Music/Music2.mid" Content="Song #2" Style="{StaticResource PhoneHyperlinkStyle}" />

                    <Button Content="Video"/>
                    <HyperlinkButton NavigateUri="/Video/Video1.wmv" Content="Video #1" Style="{StaticResource PhoneHyperlinkStyle}"/>
                    <HyperlinkButton NavigateUri="/Video/Video2.wmv" Content="Video #2" Style="{StaticResource PhoneHyperlinkStyle}"/>

                    <TextBlock Text="Stack Manipulation" Style="{StaticResource MenuTitle}"/>
                    <HyperlinkButton NavigateUri="/DeadEnd" Content="Dead End" Style="{StaticResource PhoneHyperlinkStyle}"/>

                    <TextBlock Text="About" Style="{StaticResource MenuTitle}"/>
                    <HyperlinkButton NavigateUri="/About" Content="About" Style="{StaticResource PhoneHyperlinkStyle}"/>
                </StackPanel>
            </ScrollViewer>
        </Grid>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>